/**
 * Created by HUANG on 2016/1/21.
 */
'use strict';
angular.module('nec-admin.teacher')
    .service('teacherService', ['$http', 'serverUrl',function ($http, serverUrl) {
        var service = this;
        var url = serverUrl;

        service.getStuScores = function (classId) {
            return $http({
                url: url + '/stuScores',
                method: 'GET',
                params: {
                    classId: classId
                }
            }).then(function (resp) {
                var result = resp.data;
                return result;
            });
        };

        service.score = function (stuId, sbjId, score){
            return $http({
                url: url + '/score',
                method: 'PUT',
                params: {
                    stuId: stuId,
                    sbjId: sbjId,
                    score: score
                }
            });
        };
    }]);
